<template>
  <div class="appPage">
    <!--    <div class="crumbs">-->
    <!--      <el-breadcrumb separator="/">-->
    <!--        <el-breadcrumb-item>-->
    <!--          基础表格-->
    <!--        </el-breadcrumb-item>-->
    <!--      </el-breadcrumb>-->
    <!--    </div>-->
    <h3 class="tit">通话记录监控</h3>
    <div class="search">
      <div class="left">
        <span>落地类型</span>
        <el-select v-model="value" placeholder="全部">
          <el-option
              v-for="item in options"
              :key="item.value"
              :label="item.label"
              :value="item.value">
          </el-option>
        </el-select>
        <span>状态</span>
        <el-option
            v-for="item in option"
            :key="item.value"
            :label="item.label"
            :value="item.value">
        </el-option>
        <el-button type="primary" icon="el-icon-search" @click="handleSearch" class="searchBtn">查找</el-button>
        <div class="right">
          <div class="reset"></div>
        </div>
      </div>
    </div>
    <div class="container">
      <el-table
          :data="tableData"
          border
          class="table"
          ref="multipleTable"
          header-cell-class-name="table-header"
          @selection-change="handleSelectionChange"
      >
        <el-table-column prop="企业编号" label="企业编号" align="center"></el-table-column>
        <el-table-column prop="主叫" label="主叫" align="center"></el-table-column>
        <el-table-column prop="被叫" label="被叫" align="center"></el-table-column>
        <!--        <el-table-column label="账户余额">-->
        <!--          <template #default="scope">￥{{ scope.row.money }}</template>-->
        <!--        </el-table-column>-->
        <el-table-column prop="apitype" label="apitype" align="center"></el-table-column>
        <el-table-column prop="计费时间（秒）" label="计费时间（秒）" align="center"></el-table-column>
        <el-table-column prop="开始时间" label="开始时间" align="center"></el-table-column>
        <el-table-column prop="结束时间" label="结束时间" align="center"></el-table-column>
        <el-table-column prop="状态" label="状态" align="center"></el-table-column>

      </el-table>
      <div class="pagination">
        <el-pagination
            background
            layout="total, prev, pager, next"
            :current-page="query.pageIndex"
            :page-size="query.pageSize"
            :total="pageTotal"
            @current-change="handlePageChange"
        ></el-pagination>
      </div>
    </div>
    <!-- 编辑弹出框 -->
    <el-dialog title="编辑" v-model="editVisible" width="30%">
      <el-form ref="form" :model="form" label-width="70px">
        <el-form-item label="用户名">
          <el-input v-model="form.name"></el-input>
        </el-form-item>
        <el-form-item label="地址">
          <el-input v-model="form.address"></el-input>
        </el-form-item>
      </el-form>
      <template #footer>
                <span class="dialog-footer">
                    <el-button @click="editVisible = false">取 消</el-button>
                    <el-button type="primary" @click="saveEdit">确 定</el-button>
                </span>
      </template>
    </el-dialog>
  </div>
</template>

<script>
export default {
  name: "xnum",
  data() {
    return {
      query: {
        address: "",
        name: "",
        pageIndex: 1,
        pageSize: 10
      },
      tableData: [],
      multipleSelection: [],
      delList: [],
      editVisible: false,
      pageTotal: 0,
      form: {},
      idx: -1,
      id: -1,
      options: [{
        value: '选项1',
        label: 'JH'
      }, {
        value: '选项2',
        label: 'RY'
      }, {
        value: '选项3',
        label: 'YSH'
      }],
      value: ''
    };
  },
  created() {

  },
  methods: {
    // 分页导航
    handlePageChange(val) {
      this.$set(this.query, "pageIndex", val);
      this.getData();
    }
  }
};
</script>

<style scoped>

.tit{
  font-weight: normal;
  font-size: 36px;
  color: #333333;
}
.search{
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}
.left{
  display: flex;
  align-items: center;
}
.left span{
  width: 100px;
}
.searchBtn{
  margin-left: 15px;
}
.right{
  display: flex;
  justify-content: flex-end;
}
.reset{
  width: 40px;
  height: 34px;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.add{
  margin-left: 15px;
}
.container{
  margin-top: 20px;
}
</style>
